package com.example.user.service.admin;

import cn.hutool.core.util.StrUtil;
import com.example.framework.security.core.util.JwtTokenUtils;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class AdminService {

    @Resource
    private JwtTokenUtils jwtTokenUtils;

    public void kickAccount(String userId, String deviceId) {
        if (StrUtil.isBlank(deviceId)) {
            jwtTokenUtils.removeToken(userId);
        } else {
            jwtTokenUtils.removeToken(userId, deviceId);
        }
    }
}
